import Vue from 'vue'
import Router from 'vue-router'
import recycle from './recycle.vue'
const home = resolve => require(['./components/home'], resolve)
const apply = resolve => require(['./components/apply'], resolve)
const orderList = resolve => require(['./components/list'], resolve)
const storeList = resolve => require(['./components/store'], resolve)
const orderListMore = resolve => require(['./components/listMore'], resolve)
const userInfo = resolve => require(['./components/userInfo'], resolve)


Vue.use(Router)


const routes = {
  path: '/',
  component: recycle,
  children: [
    {path: '/recycle', component: home, name: '旧车回收主页'},
    {path: '/recycle/list', component: orderList, name: '旧车回收列表'},
    {path: '/recycle/apply', component: apply ,meta: { keepAlive: true }, name: '旧车回收评估'},
    {path: '/recycle/list/listMore', component: orderListMore, name: '旧车回收评估详情'},
    {path: '/recycle/store', component: storeList, name: '商店'},
    {path: '/recycle/userInfo', component: userInfo, name: '旧车回收用户信息'}
  ]
}

export default routes
